class Post < ActiveRecord::Base
  has_many :comments
  
  def book
    @book ||= Book.find(book_id) unless book_id.blank?
  end
end
